package com.fallsvc.re.networkprogramming.singleton.lazy;

/**
 * @auther falls_vc
 * description:
 * @date 2025/10/29  8:50
 */
public class Singleton {
   private volatile static Singleton singleton = null;

   private Singleton() {

   }

   public static Singleton getInstance() {
       if (singleton == null) {
           synchronized (Singleton.class) {
               if (singleton == null) {
                   singleton = new Singleton();
               }
           }
       }

       return singleton;
   }
}
